<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class Validation</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Validation</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">数据验证类</p>
	<ul class="tags">
				<li><span class="field">author:</span> liu21st &lt;<a href="mailto:liu21st@gmail.com">liu21st@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id$</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_ORG---Text---Validation.class.php.html">/ORG/Text/Validation.class.php</a> (line <span class="field">24</span>)
		</p>
		
				
		<pre><a href="../../Think/Core/Base.html">Base</a>
   |
   --Validation</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
												<div class="var-title">
					static <span class="var-type">integer</span>
					<a href="#$regex" title="details" class="var-name">$regex</a>
				</div>
																							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
										
				<div class="method-definition">
					static 						<span class="method-result">boolean</span>
										<a href="#check" title="details" class="method-name">check</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$checkName</span>)
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#getRegex" title="details" class="method-name">getRegex</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																															</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$regex" id="$regex"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			static <span class="var-type">integer</span>
			<span class="var-name">$regex</span>
			 = <span class="var-default">array(<br />            'require'=&gt; '/.+/', //匹配任意字符，除了空和断行符<br />            'email' =&gt; '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/',<br />            'phone' =&gt; '/^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/',<br />            'mobile' =&gt; '/^((\(\d{2,3}\))|(\d{3}\-))?13\d{9}$/',<br />            'url' =&gt; '/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&amp;_~`@[\]\':+!]*([^&lt;&gt;\&quot;\&quot;])*$/',<br />            'currency' =&gt; '/^\d+(\.\d+)?$/',<br />            'number' =&gt; '/\d+$/',<br />            'zip' =&gt; '/^[1-9]\d{5}$/',<br />            'qq' =&gt; '/^[1-9]\d{4,12}$/',<br />            'integer' =&gt; '/^[-\+]?\d+$/',<br />            'double' =&gt; '/^[-\+]?\d+(\.\d+)?$/',<br />            'english' =&gt; '/^[A-Za-z]+$/',<br />    )</span>			(line <span class="line-number">35</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">预定义验证格式</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>

						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcheck" id="check"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static check</span> (line <span class="line-number">64</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">验证数据项</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">boolean</span>
		<span class="method-name">
			check
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$checkName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$checkName</span><span class="var-description">: 验证的数据类型名或正则式</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: 要验证的数据</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetRegex" id="getRegex"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static getRegex</span> (line <span class="line-number">83</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得验证类型的正则表达式</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			getRegex
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: 验证类型名称</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 27 Mar 2008 08:21:00 +0000 by 塞北的雪
	</p>
	</div></body>
</html>